<extend name="layout/main" />

<block name="HEADER">
	
</block>

<block name="CONTENT">
	<div class="wrapper">
		<div class="panel-heading">
			<control:search id="searchs" />
		</div>
		<div class="content">
			<control:grid id="grid" padding="0" height="100%" />
		</div>
	</div>
</block>

<block name="FOOTER">
	<script type="text/javascript">
		var page = (function(ns){
     
		    //页面初始化
		    ns.init=function(){
		        ns.query();
		    }
		    
		    //搜索事件
		    ns.query=function(){
		    	grid.load( searchs.getData() );
		    }
		    
		    //新增
		    ns.add=function(){
				var filter={
		            url:"modules/news/forum/edit",
		            oid:"",
		            mode:1,
		            type: 'auditorium'
		        }
				$.openWin(filter, "资讯编辑",['830px', '600px']);
		    }
		    
		    //编辑
		    ns.edit = function(){
		        var filter = {
		            url:"modules/news/forum/edit",
		            oid: grid.getSelectedColumnValue('id'),
		            mode:2,
		            type: 'auditorium'
		        }
		        $.openWin(filter,"资讯编辑",['830px','600px']);
		    }  
		    
		    //删除
		    ns.del =function(){
		    	grid.deleteSelectRow();
		    }
		    
		    return ns;
		}({}));
		
		
		$(function(){ page.init();  });

	</script>
</block>